-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add bundle download for repository #14538
Conversation
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Please resolve the conflicts. |
# Conflicts: # routers/web/repo/repo.go # services/archiver/archiver.go # templates/repo/home.tmpl
Signed-off-by: jolheiser <john.olheiser@gmail.com>
This should be ready to test again.
|
Since .zip and .tar.gz will only include current branch codes, it's confusing that this will bundle --all. Maybe add two menu items, one is for current branch another is --all. |
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Alright, this now downloads a bundle at the current branch/commit. After merging, I will follow up with a PR that adds the |
Codecov Report
@@ Coverage Diff @@
## main #14538 +/- ##
==========================================
- Coverage 45.50% 45.49% -0.01%
==========================================
Files 762 762
Lines 85940 85973 +33
==========================================
+ Hits 39108 39117 +9
- Misses 40521 40546 +25
+ Partials 6311 6310 -1
Continue to review full report at Codecov.
|
This PR adds another download type for repositories, bundle.
This currently always bundles using
--all
, since I'd imagine it's almost always more useful to have the entire repo history.In the future, bundling could be considered for backups since they are standalone repositories, more or less.
One thing that I couldn't seem to shake when writing this, it seems like the bundle file refused to copy correctly unless I closed the file after creation (and subsequently re-opened to allow the
io.Copy
).Please let me know if I missed something silly. 🙂